home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-12 | 1.0 KB | 56 lines | [TEXT/MPCC] |
- // PICT Object Handler for the WASTE Text Engine
- // by Michael F. Kamprath, kamprath@earthlink.net
- //
- // v1.0, 12 March 1995
- //
-
- #include "WASTE.h"
- #include "WE_PICT_Handler.h"
- #include "WASTE_Objects.h"
-
- //
- // New Object Handler for PICTs
- //
- pascal OSErr HandleNewPicture(Point *defaultObjectSize,WEObjectReference objectRef)
- {
- PicHandle thePic;
- Rect theFrame;
-
- thePic = (PicHandle)WEGetObjectDataHandle(objectRef);
-
- theFrame = (*thePic)->picFrame;
-
- OffsetRect(&theFrame, -theFrame.left, -theFrame.top);
-
- *defaultObjectSize = botRight(theFrame);
-
- return(noErr);
- }
-
- //
- // Dispose Object Handler for PICTS
- //
- pascal OSErr HandleDisposePicture(WEObjectReference objectRef )
- {
- PicHandle thePic;
-
- thePic = (PicHandle)WEGetObjectDataHandle(objectRef);
-
- if (thePic)
- KillPicture(thePic);
-
- return(MemError());
- }
- //
- // Draw Object Handler for PICTs
- //
- pascal OSErr HandleDrawPicture (Rect *destRect, WEObjectReference objectRef )
- {
- PicHandle thePic;
-
- thePic = (PicHandle)WEGetObjectDataHandle(objectRef);
-
- DrawPicture(thePic, destRect);
-
- return( noErr );
- }